<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<title>${sp.system_title}</title>
	<meta name="referrer" content="no-referrer" />
	<meta name="Keywords" Content="${sp.html_head_Keywords}" />
	<meta name="Description" Content="${sp.html_head_Description}" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<!-- 系统ICO图标 -->
	<link href="<%=request.getContextPath()%>/img/zico.ico" rel="shortcut icon" type="image/x-icon"
		  media="screen,print" />

	<!-- 添加jQuery -->
	<script src="<%=request.getContextPath()%>/js/jquery-3.3.1.min.js"></script>

	<!-- 添加BootStrap -->
	<script src="<%=request.getContextPath()%>/js/bootstrap-4.6.0/js/popper.min.js" type="text/javascript"></script>
	<link href="<%=request.getContextPath()%>/js/bootstrap-4.6.0/css/bootstrap.min.css" rel="stylesheet"
		  type="text/css" media="screen,print" />
	<script src="<%=request.getContextPath()%>/js/bootstrap-4.6.0/js/bootstrap.min.js"
			type="text/javascript"></script>

	<!-- EasyUI -->
	<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/jquery.easyui.min.js"></script>
	<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/plugins/jquery.datagrid.js"></script>
	<link href="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/themes/gray/easyui.css" rel="stylesheet"
		  type="text/css" media="screen,print" />
	<!-- 添加平台公用js css -->
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/z.js?version=${sp.zversion}"
			charset="UTF-8"></script>
	<link href="<%=request.getContextPath()%>/js/z.css?version=${sp.zversion}" rel="stylesheet" type="text/css"
		  media="screen,print" />

	<script type="text/javascript">
		function CustomerRegister() {
			var nicknameid = $("#nicknameid").val();
			var telid = $("#telid").val();
			var passwordid = $("#passwordid").val();
			var password2id = $("#password2id").val();

			if (!isNull(nicknameid)) {
				if (!isNull(telid)) {
					if (!isNull(passwordid)) {
						if (!isNull(password2id)) {
							if (passwordid==password2id) {
								//提交注册
								$("#CustomerForm").submit();
							} else {
								$("#ErrorInfo").html("登录密码与确认密码不相同");
								$("#password2id").focus();
							}
						} else {
							$("#ErrorInfo").html("确认密码不能为空");
							$("#password2id").focus();
						}
					} else {
						$("#ErrorInfo").html("登录密码不能为空");
						$("#passwordid").focus();
					}
				} else {
					$("#ErrorInfo").html("手机号不能为空");
					$("#telid").focus();
				}
			} else {
				$("#ErrorInfo").html("昵称不能为空");
				$("#nicknameid").focus();
			}
		}
	</script>
</head>

<body>
<div class="container">
	<div class="row vh-100 d-flex align-items-center">
		<div class="col-4"></div>
		<div class="col-4">
			<form action="customer_register" method="get" id="CustomerForm" enctype="multipart/form-data">
				<div class="form-group">
					<label>客户编号</label>
					<p class="border p-2 rounded">${zid}</p>
					<input type="hidden" name="zid" value="${zid}">
				</div>
				<div class="form-group">
					<label>昵称</label>
					<input type="text" class="form-control" id="nicknameid" name="nickname" placeholder="请输入昵称">
				</div>
				<div class="form-group">
					<label>手机号</label>
					<input type="text" class="form-control" id="telid" name="tel" placeholder="请输入手机号">
				</div>
				<div class="form-group">
					<label>登录密码</label>
					<input type="password" class="form-control" id="passwordid" name="password_login" placeholder="请输入密码">
				</div>
				<div class="form-group">
					<label>确认密码</label>
					<input type="password" class="form-control" id="password2id" placeholder="请输入密码">
				</div>
				<button type="button" class="btn btn-primary" onclick="CustomerRegister()"> 提 交 </button>
				<div class="form-group mt-2">
					<label id="ErrorInfo" style="color: red;">${ErrorInfo}</label>
				</div>
			</form>
		</div>
		<div class="col-4"></div>
	</div>
</div>
</body>

</html>